clear all

use Master2018.dta


replace both_overall = both_overall[_n-1] if missing(both_overall)

egen firstdate_break = min(date) if bothinbreak == 1, by(both_overall)
label var firstdate "Date of start of Break"

egen lastdate_break = max(date) if bothinbreak == 1 , by(both_overall)
label var lastdate "Date of end of Break"

gen day_break = date - firstdate_break
label var day_break "Number of days from start of break"
gen prop_day_break = day_break / (lastdate_break - firstdate_break)
label var prop_day_break "Proportion of time to the end of the break"

drop if bothinsession == 1
sort prop_day_break


gen cume_maj = sum(ordinances) / 293 if LegisMaj == 1
gen cume_min = sum(ordinances) / 398 if LegisMaj == 0

//There are 309 ords with LegisMaj govts and 382 with minority
label var cume_maj "Bicameral majority"
label var cume_min "Bicameral minority"

// The next line replicate Figure 2 from the paper
twoway line cume_maj cume_min prop_day_break, scheme(s2mono)




//ordninance by year graph

clear all

use Master2018.dta

// The data is next collapsed at the Lok Sabha overall session level

replace LS_overall = LS_overall[_n-1] if missing(LS_overall)
#delimit ;
collapse
(sum)
totalordinances = ordinances

, by(year);
#delimit cr

label var totalordinances "Number of Ordinances"

// The next line replicate Figure 1 from the paper
twoway bar totalordinances year, xlabel(1952(68)2019) 

//xscale(range(1952 2020) noextend)



